﻿using System;
using System.Collections.Generic;
using System.Text;
using ChangeProblem.Logic;
using Xunit;

namespace ChangeProblemNoTwo.Test
{
 
    public class ChangeProblemNoTow
    {
        ChangeProblems2 change = new ChangeProblems2();
        [Fact]
        public void GetNumbersTest()
        {
            decimal[] denomination = new decimal[] { 100m, 50m, 20m, 10m, 5m, 1m, 0.5m, 0.1m };
            int[] denominationNumbers = new int[] { 1, 1, 10, 10, 1, 1, 1, 1, };
            int[] denominationNumber = new int[] { 0, 0, 0, 0, 0, 0, 0, 0, };
            var theRestMenoy = change.Change(150m, 104.4m);
            int[] numberOfMoney = change.GetNumbers(theRestMenoy, denomination, denominationNumbers, denominationNumber);
            int[] numberOfMoneyTest = { 0, 0, 2, 0, 1, 0, 1, 1 };
            Assert.Equal(numberOfMoneyTest, numberOfMoney);
        }

    }
}
